<%@page import="bean.News"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>编辑新闻</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../css/layui.css" media="all">
</head>

<body>

	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 20px;">
		<legend>新闻编辑</legend>
	</fieldset>
	<%
		News news = (News) session.getAttribute("nowNews");
	int currentPage = (int) (session.getAttribute("currentPage"));
	%>
	<form action="/News/UpdateNews?id=<%=news.getId()%>"
		method="post" name="publish" enctype="multipart/form-data">

		<div class="layui-form-item">
			<label class="layui-form-label">新闻标题</label>
			<div class="layui-input-block">
				<input type="text" value="<%=news.getTitle()%>" name="title"
					lay-verify="title" autocomplete="off" class="layui-input"
					placeholder="请输入新闻标题（15字左右，否则可能导致发布失败）">
			</div>
		</div>

		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">新闻内容</label>
			<div class="layui-input-block">
				<textarea name="text" style="width: 90%; height: 335px"
					class="layui-textarea" placeholder="请输入新闻内容（如需添加新闻配图，请在下方选择图片文件）"><%=news.getText()%></textarea>
			</div>
		</div>

		<div class="layui-input-block">
			<input type="file" name="file" value="新闻配图">
		</div>

		<div class="layui-btn-container">
			<div class="layui-input-block">
				<input type="submit" class="layui-btn layui-btn-radius"
					value="完成编辑"> <input type="reset"
					class="layui-btn layui-btn-radius" value="撤销修改"></input> <a
					href="manageNews.jsp?currentPage=<%=currentPage%>"><input
					type="button" class="layui-btn layui-btn-radius" value="返回"></input></a>
			</div>
		</div>

	</form>


</body>

</html>